<center>
  <form autocomplete="off" action="/post.php<?php if (isset($post_tail)) echo $post_tail ?>" method="POST">
    <table>
    <?php
     if (!isset($_GET['id'])):
     echo '
     <tr>
       <th align="right" style="vertical-align:top;"><label for="topic">Topic:</label></th>
       <td><input type="text" name="topic" required="true" /></td>
     </tr>';
     endif;
    ?>

    <tr>
      <th align="right" style="vertical-align:top;"><label for="name">Name:</label></th>
      <td><input type="text" name="name" placeholder="Anonymous" /></td>
    </tr>

    <tr>
      <th align="right" style="vertical-align:center;"><label for="email">Email:</label></th>
      <td><input type="text" name="email" />
          <button type="submit">Post</button></td>
    </tr>

    <input name="pulcinella" value="43aa950ba2689dd76e55e2596163a43b" type="hidden" />

    <tr>
      <th align="right" style="vertical-align:top;"><label for="message">Message:</label></th>
      <td><textarea cols="50" rows="10" name="message" required="true"></textarea></td>
    </tr>

    <?php if (!isset($_GET['id'])): ?>
    <tr>
      <th align="right" style="vertical-align:center;"><label for="tag">Tag:</label></th>
        <select name="tag" required="true">
    <?php
         foreach ($CONF['BBS_TAGS'] as $tag):
             if ($tag == $CONF['DEFALUT_TAG'])
                 $default_option = ' selected="true"';
             else
                 $default_option = '';
             echo "<option value=\"{$tag}\"" . $default_option . ">{$tag}</option>";
         endforeach;
    ?>
      </select><br/>
    </tr>
    <?php endif; ?>

    </table>
  </form>
</center>
